package com.gym.openapi.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Data
@ToString
@AllArgsConstructor
public class Menu implements Serializable {
    private Integer id;

    private String name;

    private Integer parentId;

    private String url;

    private String icon;

    private String perms;

    private Short type;

    private Integer sort;

    private List<Menu> children;

    private static final long serialVersionUID = 1L;

    public Menu(Integer id, String name, Integer parentId, String url, String icon, String perms, Short type, Integer sort) {
        this.id = id;
        this.name = name;
        this.parentId = parentId;
        this.url = url;
        this.icon = icon;
        this.perms = perms;
        this.type = type;
        this.sort = sort;
    }

    public Menu() {
        super();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon == null ? null : icon.trim();
    }

    public String getPerms() {
        return perms;
    }

    public void setPerms(String perms) {
        this.perms = perms == null ? null : perms.trim();
    }

    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
}